package com.supervision.manage.service

import com.fly.base.misc.pagination.Pagination
import com.supervision.domain.bean.po.SmsPO
import com.supervision.domain.model.SmsRecord
import com.supervision.manage.mapper.SmsRecordMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

@Service("SmsRecordService")
class SmsRecordService {

    companion object {
        private val logger = org.slf4j.LoggerFactory.getLogger(SmsRecordService::class.java)
    }

    @Autowired
    lateinit var smsRecordMapper: SmsRecordMapper

    fun select(condition: SmsRecord, otherCondition: String?): List<SmsRecord> {
        return smsRecordMapper.select(condition, otherCondition)
    }

    fun getSmsRecordList(po: SmsPO) {
        smsRecordMapper.getSmsRecordList(po, Pagination.limitSql(po.page, po.pageSize))
    }
}
